package com.develop.skwen.electricgomall.util;

import com.develop.skwen.electricgomall.home.model.HomeData;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by skwen
 * on 18-5-30
 */

public class HomeDataUtil {


    private static HomeDataUtil sHomeDataUtil;


    private String type2_image = "https://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=https%3A%2F%2Ftimgsa.baidu.com%2Ftimg%3Fimage%26quality%3D80%26size%3Db9999_10000%26sec%3D1527680765564%26di%3Dbde1b6fc9797e6a4e275ca1ec20a68f3%26imgtype%3D0%26src%3Dhttp%253A%252F%252Fimg.zcool.cn%252Fcommunity%252F018c7157bea9220000012e7e126aa5.jpg%2540900w_1l_2o_100sh.jpg&thumburl=https%3A%2F%2Fss2.bdstatic.com%2F70cFvnSh_Q1YnxGkpoWK1HF6hhy%2Fit%2Fu%3D4111252436%2C1531731220%26fm%3D27%26gp%3D0.jpg";

    private String type1_image1 = "https://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=https%3A%2F%2Ftimgsa.baidu.com%2Ftimg%3Fimage%26quality%3D80%26size%3Db9999_10000%26sec%3D1527680700372%26di%3Db2933946ce3f266835effd51bf4aa854%26imgtype%3D0%26src%3Dhttp%253A%252F%252Fimg.zcool.cn%252Fcommunity%252F01b00d55dc1bee6ac7251df8912976.jpg%25402o.jpg&thumburl=https%3A%2F%2Fss0.bdstatic.com%2F70cFvHSh_Q1YnxGkpoWK1HF6hhy%2Fit%2Fu%3D3177316286%2C1378382030%26fm%3D27%26gp%3D0.jpg";

    private String type1_image2 = "https://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=https%3A%2F%2Ftimgsa.baidu.com%2Ftimg%3Fimage%26quality%3D80%26size%3Db9999_10000%26sec%3D1527680700370%26di%3D4ec305c48aa59d678bb4476b65623020%26imgtype%3D0%26src%3Dhttp%253A%252F%252Fimg.zcool.cn%252Fcommunity%252F01d6cb591d4150a801216a3e55330f.jpg%25401280w_1l_2o_100sh.jpg&thumburl=https%3A%2F%2Fss1.bdstatic.com%2F70cFuXSh_Q1YnxGkpoWK1HF6hhy%2Fit%2Fu%3D575420140%2C2093922481%26fm%3D27%26gp%3D0.jpg";

    private String type1_image3 = "https://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=https%3A%2F%2Ftimgsa.baidu.com%2Ftimg%3Fimage%26quality%3D80%26size%3Db9999_10000%26sec%3D1527680700370%26di%3D9f49a27d41490c569948907fa40e7014%26imgtype%3D0%26src%3Dhttp%253A%252F%252Fimg.zcool.cn%252Fcommunity%252F0175cf5684eb2132f8759f0449bbf0.jpg&thumburl=https%3A%2F%2Fss0.bdstatic.com%2F70cFuHSh_Q1YnxGkpoWK1HF6hhy%2Fit%2Fu%3D499350938%2C3713457062%26fm%3D27%26gp%3D0.jpg";

    private String normal_image = "https://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=https%3A%2F%2Ftimgsa.baidu.com%2Ftimg%3Fimage%26quality%3D80%26size%3Db9999_10000%26sec%3D1527680835184%26di%3D24a5d6c00ad9788e9d084e6dcff3824e%26imgtype%3D0%26src%3Dhttp%253A%252F%252Fimg5.duitang.com%252Fuploads%252Fitem%252F201604%252F24%252F20160424150612_KPwTU.jpeg&thumburl=https%3A%2F%2Fss0.bdstatic.com%2F70cFuHSh_Q1YnxGkpoWK1HF6hhy%2Fit%2Fu%3D867446133%2C4239676241%26fm%3D27%26gp%3D0.jpg";


    private HomeDataUtil() {

    }

    public static HomeDataUtil getInstance() {
        if (sHomeDataUtil == null) {
            sHomeDataUtil = new HomeDataUtil();
        }
        return sHomeDataUtil;
    }





    public List<HomeData> getListHomeData(){
        List<HomeData> list = new ArrayList<>();
        List<String> strings = new ArrayList<>();
        strings.add(type1_image1);
        strings.add(type1_image2);
        strings.add(type1_image3);
        HomeData homeData1 = new HomeData();
        homeData1.setType(0);
        homeData1.setAd_images(strings);
        list.add(homeData1);


        HomeData homeData2 = new HomeData();
        homeData2.setType(1);
        homeData2.setImage(type2_image);
        list.add(homeData2);

        for (int i = 0; i < 10; i++) {
            HomeData item = new HomeData();
            item.setImage(normal_image);
            item.setTitle("这是个标题，测试数据");
            item.setType(2);
            item.setPrice((float) (Math.random()*1000));
            list.add(item);
        }

        return list;
    }





}
